package ai.people.netmon.framework.domain.graph.request;

import ai.people.netmon.framework.constant.GraphDirection;
import com.people.core.validator.annotation.StringStatusValue;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

/**
 * @author zhenglin
 * @date 2022/5/13
 */
@Data
public class InsertRelationRequest {

    /**
     * node1
     */
    @Valid
    InsertRequest node1;

    /**
     * node2
     */
    @Valid
    InsertRequest node2;

    /**
     * 边类型
     *
     * @mock family
     */
    @NotBlank(message = "边类型不能为空")
    String edge;

    /**
     * node1 和 node2 指向关系
     *
     * @mock FROM\TO\BOTH
     */
    @NotBlank(message = "指向关系不能为空")
    @StringStatusValue(values = {GraphDirection.FROM,GraphDirection.TO, GraphDirection.BOTH},message = "方向值非法")
    String direction;
}
